<template>
  <a-layout id="components-layout-demo-top-side-2">
    <a-layout-header id="header">
      <div class="logo">
        <img src="../../assets/logo.jpg" style="width: 40px;height:40px" />
        <h1 style="color: blueviolet">超市收银管理系统</h1>
      </div>
      
      <Exit />
      <PI :userData="userData" />
    </a-layout-header>
    <a-layout>
      <a-layout-sider width="15%" style="background:#ebeef5;margin-left:10px;">
        <div class="left">
          <a-menu
            theme="dark"
            mode="inline"
            :default-selected-keys="[$route.path]"
          >
            <a-menu-item key="/home1/yuangongguanli" id="ant-menu-item">
              <router-link to="/home1/yuangongguanli">
                <span><a-icon type="user-add" />员工管理</span>
              </router-link>
            </a-menu-item>
            <a-menu-item key="/home1/shangpingunali">
              <router-link to="/home1/shangpingunali">
                <span><a-icon type="shop" />商品管理</span>
              </router-link>
            </a-menu-item>
            <a-menu-item key="/home1/xiaoshouguanli">
              <router-link to="/home1/xiaoshouguanli">
                <span><a-icon type="line-chart" />销售统计</span>
              </router-link>
            </a-menu-item>
            <a-menu-item key="/home1/cuxiaohuodong">
              <router-link to="/home1/cuxiaohuodong">
                <span><a-icon type="gift" />促销活动</span>
              </router-link>
            </a-menu-item>
          </a-menu>
        </div>
      </a-layout-sider>
      <a-layout>
        <a-layout-content
          :style="{
            background: '#EBEEF5',
            padding: '24px',
            margin: 0,
            minHeight: '280px',
          }"
        >
          <router-view />
        </a-layout-content>
      </a-layout>
    </a-layout>
  </a-layout>
</template>
<script>
import PersonalInformation from "../../components/homec/PersonalInformation.vue";
import Exit from "../../components/homec/Exit.vue";
export default {
  name: "Home",
  components: {
    PI: PersonalInformation,
    Exit: Exit,
  },
  mounted(){
    this.userData=this.$store.state.user;
  },
  data() {
    return {
      collapsed: false,
      userData: {},
    };
  },
};
</script>


<style  scoped>
#components-layout-demo-top-side-2 {
  width: 100%;
  height: 100%;
}
.ant-menu {
  height: 100%;
}
#ant-menu-item {
  margin-top: 50px;
}
#components-layout-demo-custom-trigger .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
}

#components-layout-demo-custom-trigger .trigger:hover {
  color: blueviolet;
}
#aside,
.ant-menu,
.ant-menu-dark,
.ant-layout-sider-dark {
  border-radius: 20px;
  background-color: blueviolet;
  padding-bottom: 180%;
}
#header {
  /* background-color: #EBEEF5; */
  background-color: white;
  box-shadow: px 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  height: 10%;
  
  margin:5px;
  
}
.left {
  background-color: #ebeef5;
  width: 100%;
}
.logo {
  margin-top:30px;
  height: 40px;
  width: 300px;
  display: flex;
  padding: 0;
  margin: 0;
  float: left;
}
.logo img{
  margin-top: 15px;
}
.logo h1{
   margin-top: 18px;
  line-height: 30px;
  margin-left: 20px;
}
</style>
